import http from "@/utils/request"

// 获取vip产品 vip.charge
export let getVipProduct= (category_id) =>http.get("/product/get_product",{
    params:{
        category_id
    }
})
// 获取vip订单详情 vip.orders
export let getOrders= () =>http.post('/order/get_order')

// 获取商品信息 preorder
export let getVipProductDetails=(product_id)=>http.get("/product/get_product",{
    params:{
        product_id
    }
})

// 下单 生成预支付订单 
export let PreOrder = (product_id, quantity)=>http.post("/order/pre_order",{
    product_id, 
    quantity
})

// 获取订单详情
export let getOrderDetail = order_id =>http.post("/order/get_order",{
    order_id
})

// 发起支付
export let pay =order_id =>http.post("/pay/payment",{order_id})

// 查询支付状态
export let QueryPayStatus= order_id =>http.get("/order/query_order_status",{
    params:{
        order_id
    }
})